feat: unified Tools upscale for images and videos - #129
Conversation
|
@cursor Please review this PR, with focus on the unified visual image picker, source kind/workspace validation, and the guarantee that image Upscale never enters the video pipeline. The PR includes provider-free simulated E2E coverage. |
PR Review — Loreframe StudioRisk: medium Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
|
Revisé el PR #129 ( El aislamiento HTTP+UI se sostiene. La UI no envía No lo daría por cerrado. El worker hace El catálogo visual es solo imágenes: un vídeo de librería no se elige por tarjeta. El ratchet de code health sigue rojo por drift compartido; no es un fallo de este cambio. |
Code healthQuality score: 49.0/100Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.
Change vs PR base: -0.3 points.
Markdown, JSON catalogs and tests are out of this table. Only Most complex functions
Trend vs baseline
Warnings
Ratchet passed. |
|
cursor review |
Cursor review — picker unificado, validación y aislamiento imagen/vídeoRevisé el commit VeredictoEl enrutado HTTP + UI sí aísla imagen y vídeo en el camino feliz. No apruebo el merge tal cual: hay un default peligroso en el worker, un hueco de identidad al usar el ítem actual, y la cobertura E2E no coincide con lo que afirma el PR. 1. Picker visual unificadoBien
Huecos
const useCurrentImage = () => {
if (currentIsImage) setSource({ path: current.name, name: current.name, url: current.url, kind: 'image' })
} if (status.status === 'completed') {
clearInterval(pollInterval)
if (removingBackground) set(st => ({ toolsAssetsRevision: st.toolsAssetsRevision + 1 }))2. Validación de kind / workspaceBien (capa HTTP)
Riesgo en el worker
source_kind = str(params.get("source_kind") or "video").casefold()
source_value = (
params.get("source_path")
if source_kind == "image" else params.get("video_path")
) or params.get("_source_path") or params.get("source")
source_path = _resolve_tool_clip_path(source_value, workspace)
...
if source_extension not in _TOOL_SOURCE_EXTENSIONS[source_kind]:
raise ValueError("Source kind does not match file format")3. Garantía: imagen ↛ pipeline de vídeoEn el camino HTTP+UI la garantía se sostiene:
Los tests AST son estructurales, no runtime. FlashVSR still usa el adaptador espacial con El agujero real es el default 4. E2E simulados (sin proveedor)Cierto: el happy path de imagen está mockeado (sin tokens, sin GPU, sin medios reales). Afirma La descripción del PR sobreafirma. Dice que los E2E cubren “regresión vídeo, cancelación, fallo”. En el spec hay un test de upscale (complete). Antes de merge, o se añaden esos tres casos (el stub ya los soporta) o se corrige el resumen del PR. Follow-ups recomendados (no bloquean el aislamiento HTTP)
Ratchet de code health: rojo por drift compartido (LOC / funciones complejas). No es un fallo de este cambio; no relajar el baseline aquí. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 089bcd2. Configure here.


Resumen ejecutivo
Detalle técnico
<select>de catálogo, preview/dimensiones, endpoint/payload correcto, regresión vídeo, cancelación, fallo y asset derivado simulado.Validación
npm run i18n:check✅npm run lint -- --max-warnings=0✅npm run build✅npm run test— 605/605 ✅python -m py_compile ...✅python scripts/verify_clean_repo.py✅git diff --check✅python scripts/code_health.py --check --markdownInforme de coste
Please request Cursor review for the unified picker and image/video routing.
Note
Medium Risk
Large changes to GPU tool workers and filesystem source resolution in
_launch_runtime.py; mistakes could affect path safety or job outputs, though the pattern mirrors the existing remove-background boundary.Overview
Tools Upscale is now one post-processing action for stills and clips: images go through a new still path (
perform_spatial_upsamplingwithstill_image=True) and write a derived PNG; videos keep the existing FlashVSR/Lanczos pipeline with audio remux.The backend adds shared
_resolve_tool_source(same confinement rules as remove-background), richer tool sidecars/manifests (lineage, capability, provenance), and stricter upscale/revoice API validation. Revoice adopts the same source resolver and sidecar fields without changing its video-only behavior.The Studio Tools UI replaces the image
<select>with a thumbnail asset grid for Upscale and Remove background, accepts image or video uploads for Upscale, and submitssource+source_kindinstead of onlyvideo_path. Docs, contract tests, and E2E mocks cover the new endpoint shape.Reviewed by Cursor Bugbot for commit 089bcd2. Configure here.